<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>控制台</title>
		<link rel="stylesheet" type="text/css" href="../public/Css/identify.css" />
		<link rel="stylesheet" type="text/css" href="../public/Css/layout.css" />
		<link rel="stylesheet" type="text/css" href="../public/Css/account.css" />
		<link rel="stylesheet" type="text/css" href="../public/Css/style.css" />
		<link rel="stylesheet" type="text/css" href="../public/Css/control_index.css" />
		<link rel="stylesheet" type="text/css" href="../public/Css/bootstrap.min.css" />
		<script type="text/javascript" src="../public/Js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="../public/Js/layer/layer.js"></script>
		<script type="text/javascript" src="../public/Js/haidao.offcial.general.js"></script>
		<script type="text/javascript" src="../public/Js/select.js"></script>
		<script type="text/javascript" src="../public/Js/haidao.validate.js"></script>
	</head>

	<body>
	<?php include "../view/left1.html";?>
			<div class="view-product">
				<div class="manage-head">
					<h6 class="layout padding-left manage-head-con">用户管理</h6>
				</div>
				<table class="table table-hover">
					<thead>
					<tr>
						<th>序号</th>
						<th>账号</th>
						<th>姓名</th>
						<th>密码</th>
						<th>生日</th>
						<th>电话</th>
						<th>权限</th>
						<th>介绍</th>
						<th>QQ</th>
						<th>邮件</th>
						<th>操作</th>
					</tr>
					</thead>
					<tbody>
					<?php foreach($user_row as $vaue):?>
					<tr>
						<td><?php echo $vaue['user_id'];?></td>
						<td><?php echo $vaue['user_user'];?></td>
						<td><?php echo $vaue['user_name'];?></td>
						<td><?php echo $vaue['user_pwd'];?></td>
						<td><?php echo $vaue['user_Birthday'];?></td>
						<td><?php echo $vaue['user_phone'];?></td>
						<td><?php echo $vaue['user_admin'];?></td>
						<td><?php echo $vaue['user_meg'];?></td>
						<td><?php echo $vaue['user_qq'];?></td>
						<td><?php echo $vaue['user_mail'];?></td>
						<td><a name="dle_delete_user.php?user_id=<?php echo $vaue['user_id']?>" onclick = delect(this.name)>删除</a></td>
					</tr>
					<?php endforeach?>
					</tbody>

				</table>
				<form role="form" style="width: 500px; margin-left: 200px;" action="dle_user.php" onsubmit="return Verification()" method="post" enctype="multipart/form-data">
					<div class="form-group">
						<label for="name">登陆名</label>
						<input type="text" class="form-control" id="user" name="user"
							   placeholder="">
					</div>
					<div class="form-group">
						<label for="name">用户名称</label>
						<input type="text" class="form-control" id="name"  name="name"
							   placeholder="">
					</div>
					<div class="form-group">
						<label for="name">密码</label>
						<input type="text" class="form-control" id="pwd" name="pwd"
							   placeholder="">
					</div>
					<div class="form-group">
						<label for="name">电子邮件地址</label>
						<input type="email" class="form-control" id="email" name="email"
							   placeholder="">
					</div>
					<div class="form-group">
						<label for="name">电话</label>
						<input type="text" class="form-control" id="phone" name="phone"
						>
					</div>
					<div class="form-group">
							<label for="name">QQ</label>
						<input type="text" class="form-control" id="qq" name="qq"
						>
					</div>
					<div class="form-group">
						<label for="name">生日</label>
						<input type="date" class="form-control" name="shengri"
						>
					</div>
					<div class="form-group">
						<label for="name">个人信息</label>
						<input type="text" class="form-control" id="meg" name="meg"
						>
					</div>
					<div class="form-group">
						<label for="inputfile">头像</label>
						<input type="file" id="inputfile" name="image">
						<p class="help-block">*请上传100*100的图片</p>
					</div>
					<button type="submit" class="btn btn-default">添加</button>
				</form>
		  </div>

		<script>
			$(".sidebar-title").live('click', function() {
				if ($(this).parent(".sidebar-nav").hasClass("sidebar-nav-fold")) {
					$(this).next().slideDown(200);
					$(this).parent(".sidebar-nav").removeClass("sidebar-nav-fold");
				} else {
					$(this).next().slideUp(200);
					$(this).parent(".sidebar-nav").addClass("sidebar-nav-fold");
				}
			});
			function Verification() {
				if($(" #user ").val() ===''){
				    alert("请输入登陆名");
				    return false;
				}else if($(" #name ").val() ===''){
                    alert("请输入姓名");
                    return false;
				}else if($(" #pwd ").val() ===''){
                    alert("请输入密码");
                    return false;
                }else if($(" #email ").val() ===''){
                    alert("请输入邮件");
                    return false;
                }else if($(" #phone ").val() ===''){
                    alert("请输入电话");
                    return false;
                }else if($(" #qq ").val() ===''){
                    alert("请输入QQ");
                    return false;
                }else if($(" #meg ").val() ===''){
                    alert("请输入个人信息");
                    return false;
                }else {
				    return true;
				}
            }

            function delect(url){
                if(confirm("确定要删除吗？ ")){				//输出选择框，用户可以单击“确认”或“取消”按钮
                    window.open(url,'_parent','',false);	//如果用户确认退出，则打开logout.php页
                }else{
                    return false;

                }
            }
		</script>
	</body>
<style>
	a{
		margin: 0 auto;
		position: relative;
	}
</style>
</html>